package net.hn.hnms.biz.plan.domain;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * @author zhaoyang
 * 其他生产计划实体
 * @date 2022-08-02
 */

@Data
@NoArgsConstructor
@TableName("plan_other")
@ExcelIgnoreUnannotated
@ApiModel(value = "其他生产计划实体类")
public class PlanOther extends PlanBaseModel implements Serializable {


    private static final long serialVersionUID = -101468143112634716L;
    /**
     * ID
     */
    @ApiModelProperty(value = "ID")
    @TableId(type = IdType.ASSIGN_UUID)
    private String otherPlanId;


    /**
     * 计划编号
     */
    @ApiModelProperty(value = "计划编号")
    @NotBlank(message = "计划编号不能为空")
    @Length(max = 100,message = "计划编号长度不能超过100个字符")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String otherPlanCode;

    /**
     * 计划名称
     */
    @ApiModelProperty(value = "计划名称")
    @NotBlank(message = "计划名称不能为空")
    @Length(max = 100, message = "计划名称长度不能超过100个字符")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String otherPlanName;

    /**
     * 计划类型 0日计划 1月计划
     */
    @ApiModelProperty(value = "计划类型 0日计划 1月计划")
    @NotBlank(message = "请选择计划类型")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String otherPlanType;

    /**
     * 计划开始时间
     */
    @ApiModelProperty(value = "计划开始时间")
    @NotNull(message = "请选择计划开始时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd",
            timezone = "GMT+8"
    )
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private Date planStartDate;

    /**
     * 计划结束时间
     */
    @ApiModelProperty(value = "计划结束时间")
    @NotNull(message = "请选择计划结束时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd",
            timezone = "GMT+8"
    )
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private Date planEndDate;

    /**
     * 巷道维修(m)
     */
    @ApiModelProperty(value = "巷道维修(m)")
    @Digits(integer = 9, fraction=2, message = "巷道维修格式不正确")
    @DecimalMin(value = "0.00", message = "巷道维修格式不正确")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal planRepair;

    /**
     * 灌浆下土量(m³)
     */
    @ApiModelProperty(value = "灌浆下土量(m³)")
    @Digits(integer = 9, fraction=2, message = "灌浆下土量格式不正确")
    @DecimalMin(value = "0.00", message = "灌浆下土量格式不正确")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal planGrout;

    /**
     * 材料消耗(万元)
     */
    @ApiModelProperty(value = "材料消耗(万元)")
    @Digits(integer = 9, fraction=2, message = "材料消耗格式不正确")
    @DecimalMin(value = "0.00", message = "材料消耗格式不正确")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal planMaterial;

    /**
     * 注氮量(万米³)
     */
    @ApiModelProperty(value = "注氮量(万米³)")
    @Digits(integer = 9, fraction=2, message = "注氮量格式不正确")
    @DecimalMin(value = "0.00", message = "注氮量格式不正确")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal planNitrogen;

    /**
     * 瓦斯抽放量(m³)
     */
    @ApiModelProperty(value = "瓦斯抽放量(m³)")
    @Digits(integer = 9, fraction=2, message = "瓦斯抽放量格式不正确")
    @DecimalMin(value = "0.00", message = "瓦斯抽放量格式不正确")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal planGasext;

    /**
     * 修旧利废(万元)
     */
    @ApiModelProperty(value = "修旧利废(万元)")
    @Digits(integer = 9, fraction=2, message = "修旧利废格式不正确")
    @DecimalMin(value = "0.00", message = "修旧利废格式不正确")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal planRecycle;

    /**
     * 生活/生产用水(万元)
     */
    @ApiModelProperty(value = "生活/生产用水(万元)")
    @Digits(integer = 9, fraction=2, message = "生活/生产用水格式不正确")
    @DecimalMin(value = "0.00", message = "生活/生产用水格式不正确")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal planWater;

    /**
     * 电费(万元)
     */
    @ApiModelProperty(value = "电费(万元)")
    @Digits(integer = 9, fraction=2, message = "电费格式不正确")
    @DecimalMin(value = "0.00", message = "电费格式不正确")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal planPower;

}
